<?php

namespace BaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Admin
 *
 * @ORM\Table(name="admin", options={"comment":"管理员表"})
 * @ORM\Entity()
 */
class Admin
{
    public static $status_array  = array(
        0 => '禁用',
        1 => '启用'
    );
    
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="username", type="string", unique=true, length=45, options={"comment":"用户名"})
     */
    private $username;

    /**
     * @var string
     *
     * @ORM\Column(name="password", type="string", length=40, options={"comment":"密码: sha1(md5(密码))"})
     */
    private $password;

    /**
     * @var string
     *
     * @ORM\Column(name="realname", type="string", length=45, nullable=true, options={"comment":"真实姓名"})
     */
    private $realname;

    /**
     * @var boolean
     *
     * @ORM\Column(name="status", type="boolean", nullable=true, options={"default":1, "comment":"状态位: 0禁用 1正常"})
     */
    private $status;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"更新时间"})
     */
    private $updatedAt;



}
